package com.yunshipei.ui.activity;

import android.content.Context;
import android.os.Bundle;
import android.view.View;

import com.yunshipei.base.BaseActivity;
import com.yunshipei.base.BaseIntentBuilder;
import com.yunshipei.common.wedigt.YspTitleBar;
import com.yunshipei.enterplorer.R;
import com.yunshipei.model.MainExtraBean;
import com.yunshipei.ui.fragment.MeFragment;

import butterknife.Bind;
import butterknife.ButterKnife;

public class NoContactsSettingsActivity extends BaseActivity {

    private static final String ARGS_NO_CONTACTS_SETTINGS_MAIN_DATA = "com.yunshipei.enterplorer.main.data";


    @Bind(R.id.et_title_bar)
    protected YspTitleBar titleBar;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_multi);
        ButterKnife.bind(this);
        titleBar.setVisibility(View.GONE);
        MainExtraBean mainExtraBean = (MainExtraBean) getIntent().getSerializableExtra(ARGS_NO_CONTACTS_SETTINGS_MAIN_DATA);
        getSupportFragmentManager().beginTransaction().replace(R.id.fl_target_part, MeFragment.newInstance(mainExtraBean), MeFragment.class.getName()).commit();
    }

    public static class NoContactsSettingIntentBuilder extends BaseIntentBuilder {

        public NoContactsSettingIntentBuilder(Context context) {
            super(context);
        }

        public NoContactsSettingIntentBuilder setMainExtra(MainExtraBean mainExtraBean) {
            getIntent().putExtra(ARGS_NO_CONTACTS_SETTINGS_MAIN_DATA, mainExtraBean);
            return this;
        }

        @Override
        protected Class<?> getTargetClazz() {
            return NoContactsSettingsActivity.class;
        }
    }
}
